package org.sakai.controller;

import org.sakai.entity.Result;
import org.sakai.entity.dto.DoctorQueryDto;
import org.sakai.entity.vo.DoctorVo;
import org.sakai.service.DoctorService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

import java.util.List;

@RestController
@RequestMapping("/doctor")
public class DoctorController {
    
    @Autowired
    private DoctorService doctorService;

    /**
     * 获取医生列表
     * @param queryDto 查询参数
     * @return 医生列表
     */
    @GetMapping("/list")
    public Result<List<DoctorVo>> getDoctorList(DoctorQueryDto queryDto) {
        return doctorService.getDoctorList(queryDto);
    }

    /**
     * 获取医生详情
     * @param id 医生ID
     * @return 医生详情
     */
    @GetMapping("/{id}")
    public Result<DoctorVo> getDoctorDetail(@PathVariable String id) {
        return doctorService.getDoctorDetail(id);
    }
} 